package org.cloud.apis;

/**
 * ClassName: PaymentFeignService
 * Package: org.cloud.apis
 * Description:
 *
 * @Author: @weixueshi
 * @Create: 2024/4/11 - 17:32
 * @Version: v1.0
 */

import org.cloud.model.dto.PayDto;
import org.cloud.response.ResultData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 支付模块相关接口
 * name的值为提供服务类的应用名称
 */
@FeignClient(name = "cloud-payment-service")
public interface PaymentFeignService {
    @GetMapping("/pay/add")
    ResultData addOrder(PayDto payDTO);

    @GetMapping("/pay/query/{orderNo}")
    ResultData queryOrder(@PathVariable("orderNo") String orderNo);


    /**
     * Micrometer(Sleuth)进行链路监控的例子
     * @param id
     * @return
     */
    @GetMapping(value = "/pay/micrometer/{id}")
    public String myMicrometer(@PathVariable("id") Integer id);
}
